<%--
  Created by IntelliJ IDEA.
  User: asus
  Date: 2020/10/31
  Time: 17:54
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
  <head>
    <title>学生管理系统首页</title>
  </head>
  <body>
    <%--<%
      String username = (String) session.getAttribute("username");
      if (username == null){
    %>
        <a href="/stu/login.jsp">请登录</a>
    <%
      }else {
    %>
        <a href="/stu/addStudent.jsp">添加学生</a>
        <a href="/stu/findStudents">查看学生</a>
    <%
      }
    %>--%>
  <c:choose>
    <c:when test="${username == null}">
      <a href="${pageContext.request.contextPath}/login.jsp">请登录</a>
    </c:when>
    <c:when test="${username != null}">
      <a href="${pageContext.request.contextPath}/addStudent.jsp">添加学生</a>
      <a href="${pageContext.request.contextPath}/findStudents">查看学生</a>
    </c:when>
  </c:choose>
  </body>
</html>
